from api.hrim_department_api import IHRMDepartmentApi
from common.token_util import TokenUtil


class DepartmentUtil:

    @classmethod
    def get_department_id(cls):
        token = TokenUtil.token_util()
        body = {"name": "财务", "code": "1"}
        resp = IHRMDepartmentApi.add_department_api(token, body)
        department_id = resp.json().get('data').get('id')
        return department_id


# if __name__ == "__main__":
#     print(DepartmentUtil.get_department_id())
